{% extends "base.html" %}

{% block content %}

{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}

{% if next %}
{% if user.is_authenticated %}
<p>Your account doesn't have access to this page. To proceed,
    please login with an account that has access.</p>
{% else %}
<p>Please login to see this page.</p>
{% endif %}
{% endif %}

<div class="inputInfoBox">
    <form method="post" action="/sign_in/">
        <h2>Login</h2>
        {% csrf_token %}
        <div class="inputBox">
            <p>{{ form.username.label_tag }}</p>
            <p>{{ form.username }}</p>
        </div>
        <div class="inputBox">
            <p>{{ form.password.label_tag }}</p>
            <p>{{ form.password }}</p>
        </div>
        <input type="submit" value="Login" name="sign_in">
        <input type="hidden" name="next" value="{{ next }}">
        <br>
        <br>
    </form>
</div>

{% endblock %}